package com.far;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

public class MainMenu extends Activity{
        
        public static final String PREF_NAME = "settings";  
        
    @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            this.overridePendingTransition(R.anim.fadein, R.anim.fadeout);
            setContentView(R.layout.main);        
            
            Utils.showToast(this, "All loaded and ready!", 1);
        }
    
    @Override
    protected void onPause() {
        super.onPause();
    }
    
    @Override
    protected void onResume() {
        super.onResume();
    }
    
    @Override
	public void onAttachedToWindow(){
		super.onAttachedToWindow();
		Window window = getWindow();
		window.setFormat(PixelFormat.RGBA_8888);
	}
    
//    public void onClickIcon(View v) {
//                
//                switch(v.getId()){
//                        case R.id.start:
//                                Utils.showToast(this, "Start Button Pressed!", 1);
//                                Intent game = new Intent(this, Game.class);
//                                startActivity(game);
//                                overridePendingTransition(R.anim.fadein, R.anim.fadeout);
//                                break;
//                        case R.id.speech:
//                        		Utils.showToast(this, "Text To Speech Button Pressed!", 1);
//                                Intent tts = new Intent(this, TextToSpeechActivity.class);
//                                startActivity(tts);
//                                overridePendingTransition(R.anim.fadein, R.anim.fadeout);
//                                break;
//                        case R.id.settings:
//                        		Utils.showToast(this, "Settings Button Pressed!", 1);
//                                Intent settings = new Intent(this, SettingsPage.class);
//                                startActivity(settings);
//                                overridePendingTransition(R.anim.fadein, R.anim.fadeout);
//                                break;
//                        case R.id.about:
//                                makeAboutDialog();
//                                break;  
//                        case R.id.exit:
//                                Utils.handleClose(this);
//                                break;
//                }
//                
//        }
    
    public void onHome(View v){
    	Utils.handleClose(this);
    }
    
private void makeAboutDialog() {                
                
            AlertDialog.Builder dialog = new AlertDialog.Builder(this);     
            dialog.setMessage("This is a test App");
            dialog.setPositiveButton("This is Positive", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface arg0, int arg1) {
                	Utils.showToast(getBaseContext(), "Positive Pressed!", 1);
                }
            });        
            dialog.show();
        }
    
}
